<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>Dart : Libraries : box2d : MathBox</title>
</head>

<body>

<header></header>

<h1 id="title">class <a name='MathBox::MathBox'>MathBox</a></h1>

<section id="inheritance">

<section class="supertype">
<h2>Supertype:</h2>
<ul><li>Object</li></ul>
</section>

</section>

<section id="summary">
</section>

<section id="fields">
</section>

<section id="constructors">
<h2>Constructors</h2>
<dl>
<dt>
<code><a href='MathBox.html#MathBox::MathBox'>MathBox</a>()</code>
</dt>
<dd>
</dd>
</dl>
</section>

<section id="methods">
<h2>Methods</h2>
<dl>
<dt>
<code>static <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::clamp'>clamp</a>(<code><a href='num.html#num::num'>num</a></code> <a name='MathBox::clamp::a'>a</a>, <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::clamp::low'>low</a>, <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::clamp::high'>high</a>)</code></dt>
<dd>
 Returns the closest value to 'a' that is in between 'low' and 'high' </dd>
<dt>
<code>static <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::distance'>distance</a>(<code><a href='Vector.html#Vector::Vector'>Vector</a></code> <a name='MathBox::distance::v1'>v1</a>, <code><a href='Vector.html#Vector::Vector'>Vector</a></code> <a name='MathBox::distance::v2'>v2</a>)</code></dt>
<dd>

 Return the distance between the two given vectors.
</dd>
<dt>
<code>static <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::distanceSquared'>distanceSquared</a>(<code><a href='Vector.html#Vector::Vector'>Vector</a></code> <a name='MathBox::distanceSquared::v1'>v1</a>, <code><a href='Vector.html#Vector::Vector'>Vector</a></code> <a name='MathBox::distanceSquared::v2'>v2</a>)</code></dt>
<dd>

 Return the distance between the two given vectors, but squared.
</dd>
<dt>
<code>static <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::translateAndScale'>translateAndScale</a>(<code><a href='num.html#num::num'>num</a></code> <a name='MathBox::translateAndScale::val'>val</a>, <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::translateAndScale::fromMin'>fromMin</a>, <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::translateAndScale::fromMax'>fromMax</a>, <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::translateAndScale::toMin'>toMin</a>, <code><a href='num.html#num::num'>num</a></code> <a name='MathBox::translateAndScale::toMax'>toMax</a>)</code></dt>
<dd>

 Given a value within the range specified by fromMin and fromMax, returns a
 value with the same relative position in the range specified from toMin and
 toMax. For example, given a val of 2 in the &quot;from range&quot; of 0-4, and a
 &quot;to range&quot; of 10-20, would return 15.
</dd>
</dl>
</section>

<footer></footer>

</body></html>
